//
// Created by Jisam on 2024/8/18 19:51.
// Solution of  约会故事
#include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <chrono>
#include <cmath>
#include <cstdint>
#include <cstring>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <vector>

using namespace std;

#define endl "\n"
#define PSI pair<string,int>
#define PII pair<int,int>
#define PDI pair<double,int>
#define PDD pair<double,double>
#define VVI vector<vector<int>>
#define VI vector<int>
#define VS vector<string>

#define PQLI priority_queue<int, vector<int>, less<int>>
#define PQGI priority_queue<int, vector<int>, greater<int>>
#define code_by_jisam ios::sync_with_stdio(false),cin.tie(nullptr)
using namespace std;
using u32 = unsigned;
using i64 = long long;
using u64 = unsigned long long;
using i128 = __int128;

void solution() {
    int n, m;
    cin >> n >> m;
    int ok = 0;
    vector<int> sts(n), ets(n);
    int ok1 = 0, ok2 = 60 + 59;
    for (int i = 0; i < n; i++) {
        string s1, s2;

        cin >> s1 >> s2;
        string st = s1.substr(0, 2), et = s1.substr(3, 2);
        string st2 = s2.substr(0, 2), et2 = s2.substr(3, 2);
//        cout << st << " " << et <<endl;
//        cout << st2 << " " << et2 <<endl;
        sts[i] = (stoi(st) - 0) * 60 + stoi(et);
        ets[i] = (stoi(st2) - 0) * 60 + stoi(et2);
//        cout << sts[i] <<" " <<ets[i] <<endl;
//        cout << "=========";
    }
    vector<string> milktea(m);
    for (int i = 0; i < m; i++) {
        cin >> milktea[i];
//        cout << "=========";
    }
    int q;
    cin >> q;
    int s1ok, s2ok, s3ok, s4ok;

    while (q--) {
        ok = 0;
        string s, s1, s2, s3;
        cin >> s >> s1 >> s2 >> s3;
//        cout << s.substr(0,2) << " " << s.substr((3,2));
        int st1 = stoi(s.substr(0, 2) ), et1 = stoi(s.substr(3, 2));
        int st11 = stoi(s1.substr(0, 2)), et11 = stoi(s1.substr(3, 2));
        int st111 = stoi(s2.substr(0, 2)), et111 = stoi(s2.substr(3, 2));
        int main1 = (st1 - 0 ) * 60 + et1;
        int main2 = (st11 - 0) * 60 + et11;
        int main3 = (st111 - 0) * 60 + et111;
//        cout << st1 << " "
//             << st11 << " "
//             << st111 << " "
//             << et1 << " "
//             << et11 << " "
//             << et111 << " "
//             << main1 << " "
//             << main2 << " "
//             << main3 << " "
//             << endl;
        s1ok = 0;
//        cout << "+==========";
        if (st1 >= ok1 && main1 <= ok2) {
            s1ok = 1;

        }
//        cout << "+==========";
        s2ok = 0;
//        cout << st1 << " " << main1 <<endl;
        for (int i = 0; i < n; i++) {
//            cout << sts[i] << " " << ets[i] << " " << endl;
            if (main1 >= sts[i] && main1 <= ets[i]) {
//                cout << sts[i] << " " << ets[i] << " " << endl;
                s2ok = 1;
                break;
            }
        }


        if (s2ok == 0 || s1ok == 0) {
            cout << "Loser xqq\n";
            continue;
        }
        s3ok = 0;

//        cout << "+==========";
        for (int i = 0; i < m; i++) {
//            cout << s3 <<  "  " << milktea[i];
            if (s3 == milktea[i]) {
                s3ok = 1;
                break;
            }
        }
//        cout << "+==========";
//        cout << main2 << " " << main3;

        s4ok = 0;
        if (main2 <= main3) s4ok = 1;

//        cout << "+==========";
        if (s3ok == 0 || s4ok == 0) {
            cout << "Joker xqq\n";
            continue;
        }
        cout << "Winner xqq" << endl;
    }

}

int main() {
    code_by_jisam;
    int T = 1;
//    cin >> T;
    while (T--) {
        solution();
    }
    return 0;
}